package com.usian.order.fegin;

import com.usian.order.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @TODO:
 * @Author:baimu
 * @Date:2024 10 24 14 01
 **/

@FeignClient("user-service")
public interface UserFegin {

    @RequestMapping("/user/findUserById")
    public User findUserById(@RequestParam("id") Integer id);

    @RequestMapping("/user/findAll")
    public List<User> findAll();


    @GetMapping("/user/getUserById/{id}")
    public User getUserById(@PathVariable("id") Integer id);

    @PostMapping("/user/insertUser")
    public int insertUser(@RequestBody User user);

}
